﻿using ConfigServices;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//指定namespace,为微软DI框架的namespace,这样service.AddXXX就无需引入新的namespace了
namespace Microsoft.Extensions.DependencyInjection
{
    public static class IniFileConfigExtensions
    {
        public static void AddIniFileConfig(this IServiceCollection services,string filepath)
        {
            services.AddScoped(typeof(IConfigService), _ => new IniFileConfigService { FilePath = filepath });
        }
    }
}
